<section class="flex-full">
  <!--所有的升压站-->
  <section class="substation-section-summary flex">
    <div class="flex-full">
      <div class="substation-section-conter">
        <table class="zk-table">
          <thead>
          <tr>
            <th>
              <span>等级</span>
            </th>
            <th>
              <span>描述</span>
            </th>
            <th>
              <span>报警时间</span>
            </th>
            <th>
              <span></span>
            </th>
          </tr>
          </thead>
          <tbody>
          <tr *ngFor="let data of substationDataSources"
              [ngStyle]="{'color':data.confirm?'#fff':'#e6bd00','background':!data.confirm?'#00693e':'#026fdb'}">
            <td>
              <span [ngStyle]="{'background':data.faultLevelColor,'color':'#fff'}">{{data.faultLevelName}}</span>
            </td>
            <td>
              <span>{{data.farmName}}-{{data.stationTagName}}</span>
            </td>

            <td>
              <span>{{data.faultTime | date:'yyyy-MM-dd HH:mm:ss'}}</span>
            </td>

            <td>
              <button (click)="onConfirm(data)" *ngIf="!data.confirm">确认</button>
              <span *ngIf="data.confirm">已确认</span>
            </td>
          </tr>
          <tbody>
        </table>
      </div>
    </div>
  </section>

  <!--按风场进行分类-->
  <section class="substation-section-detailed">
    <div *ngFor="let substationFarmData of substationFarmDatas">
      <mat-tab-group>
        <mat-tab [label]="substationFarmData?.farmName+'('+ substationFarmData?.substationNumber +')'"
                 *ngFor="let substationFarmData of substationFarmDatas">
          <div class="substation-section-conter">
            <table class="zk-table" cellspacing="0" cellpadding=0>
              <thead>
              <tr>
                <th>
                  <span>等级</span>
                </th>
                <th>
                  <span>描述</span>
                </th>
                <th>
                  <span>报警时间</span>
                </th>
              </tr>
              </thead>
              <tbody>
              <tr *ngFor="let substation of substationFarmData?.substations"
                  [ngStyle]="{'color':substation.confirm?'#fff':'#e6bd00','background':!substation.confirm?'#00693e':'#026fdb'}">
                <td>
                  <span [ngStyle]="{'background':substation.faultLevelColor,'color':'#fff'}">{{substation.faultLevelName}}</span>
                </td>
                <td>
                  <span>{{substation.farmName}}-{{substation.stationTagName}}</span>
                </td>
                <td>
                  <span>{{substation.faultTime | date:'yyyy-MM-dd HH:mm:ss'}}</span>
                </td>
              </tr>
              </tbody>
            </table>
          </div>
        </mat-tab>
      </mat-tab-group>
    </div>
  </section>
</section>

